import { createRouter,createWebHistory } from 'vue-router';
import Register from '../views/Register.vue';
import Login from '../views/Login.vue';
import Profile from '../views/Profile.vue';
import Home from '../views/Home.vue';
 const routes = [
    {
        path: '/', // 根路径
        name: 'Home',
        component:Home // 或者直接导入组件
      },
    {
        path: '/register',
        name: 'Register',
        component: Register,
    },
   
    {
        path:'/login',
        name:'Login',
        component:Login
    },
    {
        path:'/profile',
        name:'Profile',
        component:Profile,
    },
   
 ];
 const router = createRouter({
    history:createWebHistory(),
    routes,
 })
 export default router